<!--
  Generated template for the AddressMapPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title></ion-title>
    <ion-searchbar #searchBar
                   mode="ios"
                   placeholder="搜索"
                   (ionInput)="search($event.target.value)"
                   (ionFocus)="changeIsSearch()">
    </ion-searchbar>
    <ion-buttons left>
      <button ion-button icon-only (click)="dismiss()">
        <ion-icon name="ios-arrow-back" style="font-size:30px;"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content padding>

  <div class="search" *ngIf="isSearch" (click)="isSearch = false">
    <ion-list style="background:#fff;" (click)="$event.stopPropagation()">
      <ion-item *ngFor="let search of searchList" (click)="dismiss(search)">
        <h2>{{search.name}}</h2>
        <p>{{search.address}}</p>
      </ion-item>
    </ion-list>
  </div>

  <div #container style="width: 100%;height: 50%;"></div>
  <div style="width: 100%;height: 50%; max-height: 50%;overflow-y: auto;" (scroll)="getMoreDatas($event)">
    <ion-list>
      <ion-item *ngIf="markerPosition.name" (click)="dismiss(markerPosition)">
        <ion-label class="text_hide_none">
          <div class="font_size_standard">
            <i class="fa fa-map-marker mr5" style="color:#347eff;"></i>{{markerPosition.name}}
            <p>{{markerPosition.address}}</p>
          </div>
        </ion-label>

        <!--<h2 class="text_hide">{{markerPosition.name}}</h2>-->
      </ion-item>
      <ion-item *ngFor="let address of addressList" (click)="dismiss(address)">
        <h2>{{address.name}}</h2>
        <p>{{address.address}}</p>
      </ion-item>
      <div *ngIf="addressConfig.isEnd==true" class="w12 mt20 mb20 tc font_gray">
        ------------------------ 已经到底了 ------------------------
      </div>
      <div *ngIf="addressConfig.isEnd==false&&isScrolling==false" class="w12 mt20 mb20 tc font_gray font_size_standard">正在加载...
      </div>
    </ion-list>
  </div>

</ion-content>
